import http from "@/libs/http";

class MenuServer {
  async list(row) {
    let res = await http.get("/sys_menu/index", row);
    return res;
  }

  async generate(row) {
    let res = await http.post("/sys_menu/generate", row);
    return res;
  }

  async build(row) {
    let res = await http.post("/sys_menu/build", row, { hideLoad: true });
    return res;
  }

  async add(row) {
    let res = await http.post("/sys_menu/add", row);
    return res;
  }

  async edit(row) {
    let res = await http.post("/sys_menu/edit", row);
    return res;
  }

  async del(row) {
    let res = await http.post("/sys_menu/del", row);
    return res;
  }
}
const menuServer = new MenuServer();
export default menuServer;
